<!DOCTYPE html>
<html>
<head th:replace="~{components/common-head::head}"></head>
<link rel="stylesheet" th:href="@{/assets/markdown/markdown.css}">
<body>

<div id="app" >

  <el-container class="post">
  <el-header th:replace="~{components/common-header::header}"></el-header>
  
  <el-main>
  <el-row >
  <el-col class="md-margin" :xs="24" :sm="24" :md="12" :lg="12" :xl="12">

  <el-card class="box-card">
  <template #header>  
  <div class="card-header">
    <el-page-header @back="back()" title="返回" >
    <template #content>正文</template>
    </el-page-header>

    <section th:with="cates = ${post.categories}">
    <span th:each="cate, state : ${cates}" >
    【<span th:text="${cate.spec.displayName}"></span>】
    </span>
    </section>


  </div>
  </template>
  <h2 th:text="${post.spec.title}" style="text-align: center;"></h2>
  
  <el-card class="info-card-box" th:with="owner = ${post.owner}">
   <section class="info-card">
    <div class="avatar">
      <el-avatar :size="45" th:attr="src=${owner.avatar}" ></el-avatar>
    </div>
    <div class="info">
      <p class="nickname" th:text="${owner.displayName}"></p>
      <section class="some-info">
        <i class="bi bi-eye"></i><span th:text="${post.stats.visit}"></span>浏览 · 
        <i class="bi bi-file-text"></i><span th:text="${post.stats.comment}"></span>评论 ·  
        <i class="bi bi-hand-thumbs-up"></i><span th:text="${post.stats.upvote}"></span>点赞
      </section>
    </div>
   </section>
   <p class="tags">
    <span th:each="tag : ${post.tags}">
      <span class="label">#</span><span th:text="${tag.spec.displayName}"></span>&nbsp;&nbsp;
    </span>
   </p>
  </el-card>
  <article class="vuepress-markdown-body" th:utext="${post.content.content}">
   
  </article>
  </el-card>

<el-card>
<div  th:replace="~{components/comment::comment(name=${post.metadata.name})}"></div>
</el-card>


  
  

  </el-col>

  <el-col th:replace="~{components/common-aside::aside}"></el-col>

  </el-row>

  </el-main>

  </el-container>
</div>

 
</div>
  <!-- <div class="comment-box">
  <div id="comment" th:if="${haloCommentEnabled}">

  <h2>评论</h2>
  <halo:comment
  group="content.halo.run"
  kind="Post"
  th:attr="name=${post.metadata.name}"
  colorScheme="'light'"
  />
  </div>
  </div> -->


  </body>
</html>
